package org.beetl.sql2o.converters;

/**
 * Used by sql2o to convert a value from the database into a {@link Byte}.
 */
public class ByteConverter extends NumberConverter<Byte> {

 public ByteConverter(boolean primitive) {
  super(primitive);
 }

 protected Byte convertNumberValue(Number val) {
  return val.byteValue();
 }

 protected Byte convertStringValue(String val) {
  return Byte.parseByte(val);
 }

 protected String getTypeDescription() {
  return Byte.class.toString();
 }
}
